//Tue 02 Mar 2010 08:49:08 AM CST 
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>

using namespace std;

class BunnyPuzzle
{
public:
	int theCount(vector <int> bunnies)
	{
		int count = 0;
		for(int i=0; i+1<bunnies.size(); i++)
		{
			int a = 2*bunnies[i]-bunnies[i+1];
			int b = 2*bunnies[i+1]-bunnies[i];
			if((i-1>=0 && bunnies[i-1] < a) || i == 0)
			{
				count++;
				cout << a;
			}
			cout << " ";
			if((i+2<bunnies.size() && bunnies[i+2] > b) || i+2 == bunnies.size()) 
			{
				count++;
				cout << b;
			}
			cout << endl;
		}
		return count;
	}
};
